﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManagePartner.aspx.cs" Inherits="MMITPinGen.ManagePartner" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
    <link href="Styles/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
     <asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="~/Default.aspx">Home</asp:HyperLink>
        <table class="style1">
            <tr>
                <td>
                    <telerik:RadButton ID="btnNew" runat="server" onclick="btnNew_Click" Text="New" 
                        ButtonType="LinkButton">
                    </telerik:RadButton>
                    <telerik:RadButton ID="btnList" runat="server" onclick="btnList_Click" 
                        Text="List Partners" ButtonType="LinkButton">
                    </telerik:RadButton>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
    
        <table id="tblForm" runat=server>
            <tr>
                <td align="right">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    Name</td>
                <td align="left">
                    <telerik:RadTextBox ID="txtName" Runat="server" Width="125px">
                    </telerik:RadTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtName" CssClass="textEntry" 
                        ErrorMessage="Please Specify Partner Name" ValidationGroup="Submit"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" valign="top">
                    Address</td>
                <td align="left">
                    <telerik:RadTextBox ID="txtAddress" Runat="server" Height="50px" 
                        TextMode="MultiLine" Width="500px">
                    </telerik:RadTextBox>
                </td>
            </tr>
            <tr>
                <td align="right" valign="top">
                    Description</td>
                <td align="left">
                    <telerik:RadTextBox ID="txtDesc" Runat="server" Height="50px" 
                        TextMode="MultiLine" Width="500px">
                    </telerik:RadTextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Status</td>
                <td align="left">
                    <telerik:RadComboBox ID="drpStatus" Runat="server" 
                       >
                        <Items>
                            <telerik:RadComboBoxItem runat="server" Selected="True" Text="Active" 
                                Value="1" />
                            <telerik:RadComboBoxItem runat="server" Text="Inactive" Value="0" />
                        </Items>
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Password</td>
                <td align="left">
                    <telerik:RadTextBox ID="txtPassword" Runat="server" Width="125px" 
                        TextMode="Password" ValidationGroup="Submit">
                    </telerik:RadTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtPassword" CssClass="textEntry" 
                        ErrorMessage="Please Specify Password" ValidationGroup="Submit"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Confirm Password</td>
                <td align="left">
                    <telerik:RadTextBox ID="txtConfirm" Runat="server" Width="125px" 
                        TextMode="Password" ValidationGroup="Submit">
                    </telerik:RadTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txtConfirm" CssClass="textEntry" 
                        ErrorMessage="Please Confirm Password" ValidationGroup="Submit"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    &nbsp;</td>
                <td align="left">
                    <telerik:RadButton ID="btnSubmit" runat="server" Text="Submit" 
                        onclick="btnSubmit_Click" ValidationGroup="Submit">
                    </telerik:RadButton>
                </td>
            </tr>
        </table>
    
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <asp:Label ID="lblMsg" runat="server" CssClass="bold"></asp:Label>
                    </td>
            </tr>
        </table>
    
    </div>
    <telerik:RadGrid ID="grdPartners" runat="server" AutoGenerateColumns="False" 
        GridLines="None"   
        OnSelectedIndexChanged="grdPartners_SelectedIndexChanged" datakeynames="Id" 
        Width="400px">
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
       
        <telerik:GridButtonColumn DataTextField="Name" UniqueName="Name" HeaderText="Status" CommandName="Select">
        </telerik:GridButtonColumn>

        
        <telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status">
        <ItemTemplate>
            <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "Status"))  %>'  Enabled=false/>
            <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Id")  %>' />
            </ItemTemplate>
        </telerik:GridTemplateColumn>

        
    </Columns>
</MasterTableView>

<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    </form>
</body>
</html>
